import React from "react";
import { NavLink, Outlet } from "react-router-dom";

export default function Home() {
    return (
        <div>
            <h3>我是Home的内容</h3>
            <div>
                <ul className="nav nav-tabs">
                    <li>
                        {/* to可以不从根路由开始了 */}
                        <NavLink className="list-group-item" to="news">
                            News
                        </NavLink>
                    </li>
                    <li>
                        <NavLink className="list-group-item" to="/home/message">
                            Message
                        </NavLink>
                    </li>
                </ul>
                {/* 指定路由组件呈现的位置 */}
                <Outlet />
            </div>
        </div>
    );
}
